VersionConfigServiceglobal with sharing class VersionConfigService service to create, modify and validate custom configurations for project versioning and baselines. Methods
deleteVersionConfigDetailsglobal static void deleteVersionConfigDetails(List<Id> configIds) This method deletes the Version_Config__c objects with the list of IDs as passed in. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. You need to provide some sample code getActiveVersionConfigglobal static Version_Config__c getActiveVersionConfig() This method returns the active Version_Config__c object, or the standard Version_Config__c object if there is not an active custom config. Return ValueThe active Version_Config__c record. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. You need to provide some sample code getAllVersionConfigDetailsglobal static VersionConfigService.VersionConfigDetails[] getAllVersionConfigDetails() This method loads the ID, Unique_Name__c, Default__c, Summary__c and LastModifiedDate fields on all Version_Config__c objects Return ValueList of Version_Config__c records. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. You need to provide some sample code getConfigByIdglobal static Version_Config__c getConfigById(Id configId) This method returns the Version_Config__c object with the ID as passed in. Input Parameters
Return ValueThe Version_Config__c object with the given ID. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. You need to provide some sample code getVersionCaptureConfigByIdglobal static VersionConfigService.VersionCaptureConfig getVersionCaptureConfigById(Id configId) This method returns the VersionCaptureConfig object with the ID as passed in. Input Parameters
Return ValueThe VersionCaptureConfig object with the given ID. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. You need to provide some sample code saveCaptureConfigglobal static VersionConfigService.VersionCaptureConfig saveCaptureConfig(Id configId, VersionConfigService.VersionCaptureConfig toSave) This method saves the given VersionCaptureConfig to the Version_Config__c object with the given ID. Input Parameters
Return ValueThe saved VersionConfigService.VersionCaptureConfig. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. You need to provide some sample code saveVersionConfigDetailsglobal static VersionConfigService.VersionConfigDetails[] saveVersionConfigDetails(List<VersionConfigService.VersionConfigDetails> details) This method saves the given list of VersionConfigDetails to their equivalent Version_Config__c objects. Input Parameters
Return ValueUpdated VersionConfigService.VersionConfigDetails records. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. You need to provide some sample code validateCaptureConfigglobal static VersionConfigService.ValidationResult[] validateCaptureConfig(Id[] configIds) This method retrieves the Version_Config__c records with the given IDs and validates the VersionCaptureConfigs contained within. Input Parameters
Return ValueReturns a list of validation results. One result per ID is returned in the order as given. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. You need to provide some sample code validateCaptureConfigglobal static VersionConfigService.ValidationResult[] validateCaptureConfig(VersionConfigService.VersionCaptureConfig[] captureConfigs) This method validates the given VersionCaptureConfig objects. Input Parameters
Return ValueReturns a list of validation results. One result per ID is returned in the order as passed. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. You need to provide some sample code VersionConfigService.VersionConfigDetailsglobal class VersionConfigDetails Lightweight DTO for the details of the Version_Config__c object excluding the Capture_Config__c field. Used for quickly saving changes to the object such as Unique_Name__c and Default__c Properties
MethodsVersionConfigDetailsglobal VersionConfigDetails() VersionConfigService.VersionCaptureConfigglobal class VersionCaptureConfig A representation of the whole capture configuration. Properties
MethodsVersionCaptureConfigglobal VersionCaptureConfig() VersionConfigService.VersionCaptureObjectglobal class VersionCaptureObject A representation of an object you want to version. Properties
MethodsVersionCaptureObjectglobal VersionCaptureObject() VersionConfigService.VersionCaptureFieldglobal class VersionCaptureField A representation of the field you want to capture. Properties
MethodsVersionCaptureFieldglobal VersionCaptureField() VersionConfigService.ValidationResultglobal class ValidationResult An instance of this object contains the results of a validation. Properties
MethodsValidationResultglobal ValidationResult() VersionConfigService.ValidationFailureglobal class ValidationFailure An object denoting a failure in the VersionConfigValidator, to be created from a ValidationResultWrapper. Properties
MethodsValidationFailureglobal ValidationFailure() |